package com.binc.testspring.common.handler;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class DictDataDto {
    @ApiModelProperty("字典值")
    private Object dictDataName;
    @ApiModelProperty("字典key")
    private Object val;
    @JsonIgnore
    private int sort;
    @JsonIgnore
    private String remark;
    @ApiModelProperty("子节点")
    private List<DictDataDto> child;

    public DictDataDto(Object dictDataName, Object val) {
        this.dictDataName = dictDataName;
        this.val = val;
    }

    public DictDataDto() {
    }

    public Object getDictDataName() {
        return this.dictDataName;
    }

    public Object getVal() {
        return this.val;
    }

    public int getSort() {
        return this.sort;
    }

    public String getRemark() {
        return this.remark;
    }

    public List<DictDataDto> getChild() {
        return this.child;
    }

    public void setDictDataName(Object dictDataName) {
        this.dictDataName = dictDataName;
    }

    public void setVal(Object val) {
        this.val = val;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setChild(List<DictDataDto> child) {
        this.child = child;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof DictDataDto)) {
            return false;
        } else {
            DictDataDto other = (DictDataDto)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label63: {
                    Object this$dictDataName = this.getDictDataName();
                    Object other$dictDataName = other.getDictDataName();
                    if (this$dictDataName == null) {
                        if (other$dictDataName == null) {
                            break label63;
                        }
                    } else if (this$dictDataName.equals(other$dictDataName)) {
                        break label63;
                    }

                    return false;
                }

                Object this$val = this.getVal();
                Object other$val = other.getVal();
                if (this$val == null) {
                    if (other$val != null) {
                        return false;
                    }
                } else if (!this$val.equals(other$val)) {
                    return false;
                }

                if (this.getSort() != other.getSort()) {
                    return false;
                } else {
                    Object this$remark = this.getRemark();
                    Object other$remark = other.getRemark();
                    if (this$remark == null) {
                        if (other$remark != null) {
                            return false;
                        }
                    } else if (!this$remark.equals(other$remark)) {
                        return false;
                    }

                    Object this$child = this.getChild();
                    Object other$child = other.getChild();
                    if (this$child == null) {
                        if (other$child != null) {
                            return false;
                        }
                    } else if (!this$child.equals(other$child)) {
                        return false;
                    }

                    return true;
                }
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof DictDataDto;
    }

    @Override
    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $dictDataName = this.getDictDataName();
        result = result * 59 + ($dictDataName == null ? 43 : $dictDataName.hashCode());
        Object $val = this.getVal();
        result = result * 59 + ($val == null ? 43 : $val.hashCode());
        result = result * 59 + this.getSort();
        Object $remark = this.getRemark();
        result = result * 59 + ($remark == null ? 43 : $remark.hashCode());
        Object $child = this.getChild();
        result = result * 59 + ($child == null ? 43 : $child.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "DictDataDto(dictDataName=" + this.getDictDataName() + ", val=" + this.getVal() + ", sort=" + this.getSort() + ", remark=" + this.getRemark() + ", child=" + this.getChild() + ")";
    }
}